#ifndef PASS_H
#define PASS_H
#include<QString>
#include"maze.h"
#include <QWidget>
#include<QPainter>
#include<QImage>
#include <QKeyEvent>
#include<QPixmap>
#include <QThread>
#include <QThread>
#include <QTimer>
#include <QTime>
namespace Ui {
class pass;
}

class pass : public QWidget
{
    Q_OBJECT

public:
    bool isret;
    explicit pass(QWidget *parent = 0);
    ~pass();

    //画图
    void paintEvent(QPaintEvent *);
    //奇数偶数判断
    bool isEven(int sum);
    Node getStartPoint();
    void setStartPoint(Node node);
    void keyPressEvent(QKeyEvent *e);
    bool getIsHide(){
        return this->isHide;
    }
    void setIsHide(bool b){
        this->isHide=b;
    }
    QTimer* getTimer(){
        return this->timer;
    }

signals:
    void ret();


private slots:
    void on_Return_clicked();

    void on_btn1_clicked();

    void on_btn2_clicked();

    void on_btn3_clicked();

    void on_btn4_clicked();

    void on_btn5_clicked();

    void on_btn6_clicked();

    void on_btn7_clicked();

    void on_btn8_clicked();

    void on_btn9_clicked();

    void on_btn0_clicked();

    void on_Cancle_2_clicked();

    void on_Confirm_2_clicked();


    void setEnd(int n);

     void timerEvent(QTimerEvent *);
     QString secsToTime(int s);

private:


    QString t;
    Ui::pass *ui;
    int n;
    Maze maze;
    int wid;
    bool isPathfinding,isPosition;
    Node startPoint;
    bool star;
    bool success;
    QTimer *timer;
    QTime   time;
    bool isHide;
    int time1;
    int num;


};
#endif // PASS_H














#
